package com.shsxt.model;


import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

public class ROrder2 {
	private String detailAddress;
	private String type;
	private String phoneNumber;
	private String orderNumber;
	private String supportType;
	private String robListType;
	@JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private String orderTime;
	private String timeSlot;
	private Float serviceTime;
	private String address;
	private String servicePersonal;
	private Float cleaningSupplies_Price;
	private Float price;
	private Float realPrice;
	private String service_Price;
	private String orderState;
	private String redeemCode;
	
	private String score;
	private String evaluation;
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private String evaluationTime;
	private String realPhoneNumber;
	private String circle;


	public String getCircle() {
		return circle;
	}
	public void setCircle(String circle) {
		String[] day=circle.split(";")[0].split(",");
		String[] slot=circle.split(";")[1].split(",");
		String orderTime="";
		for(int i=0;i<day.length;i++){
			orderTime+=day[0]+","+slot[0]+";";
		}
		this.orderTime = orderTime;
		this.circle = circle;
		this.supportType = circle.split(";")[2];
		this.robListType = circle.split(";")[3];

	}
	public String getRedeemCode() {
		return redeemCode;
	}
	public void setRedeemCode(String redeemCode) {
		System.err.println(redeemCode);
		this.redeemCode = redeemCode;
	}
	public String getRealPhoneNumber() {
		return realPhoneNumber;
	}
	public void setRealPhoneNumber(String realPhoneNumber) {
		this.realPhoneNumber = realPhoneNumber;
	}
	@Override
	public String toString() {
		return "ROrder [detailAddress=" + detailAddress + ", type=" + type + ", phoneNumber=" + phoneNumber
				+ ", orderNumber=" + orderNumber + ", supportType=" + supportType + ", robListType=" + robListType
				+ ", orderTime=" + orderTime + ", timeSlot=" + timeSlot + ", serviceTime=" + serviceTime + ", address="
				+ address + ", servicePersonal=" + servicePersonal + ", cleaningSupplies_Price="
				+ cleaningSupplies_Price + ", price=" + price + ", realPrice=" + realPrice + ", service_Price="
				+ service_Price + ", orderState=" + orderState + ", score=" + score + ", evaluation=" + evaluation
				+ ", evaluationTime=" + evaluationTime + "]";
	}
	public ROrder2() {
		super();
		// TODO Auto-generated constructor stub
	}
	public ROrder2(String detailAddress, String type, String phoneNumber, String orderNumber, String supportType,
			String robListType, String orderTime, String timeSlot, Float serviceTime, String address,
			String servicePersonal, Float cleaningSupplies_Price, Float price, Float realPrice, String service_Price,
			String orderState, String score, String evaluation, String evaluationTime) {
		super();
		this.detailAddress = detailAddress;
		this.type = type;
		this.phoneNumber = phoneNumber;
		this.orderNumber = orderNumber;
		this.supportType = supportType;
		this.robListType = robListType;
		this.orderTime = orderTime;
		this.timeSlot = timeSlot;
		this.serviceTime = serviceTime;
		this.address = address;
		this.servicePersonal = servicePersonal;
		this.cleaningSupplies_Price = cleaningSupplies_Price;
		this.price = price;
		this.realPrice = realPrice;
		this.service_Price = service_Price;
		this.orderState = orderState;
		this.score = score;
		this.evaluation = evaluation;
		this.evaluationTime = evaluationTime;
	}
	public String getDetailAddress() {
		return detailAddress;
	}
	public void setDetailAddress(String detailAddress) {
		this.detailAddress = detailAddress;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getPhoneNumber() {
		return phoneNumber;
	}
	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}
	public String getOrderNumber() {
		return orderNumber;
	}
	public void setOrderNumber(String orderNumber) {
		this.orderNumber = orderNumber;
	}
	public String getSupportType() {
		return supportType;
	}
	public void setSupportType(String supportType) {
		this.supportType = supportType;
	}
	public String getRobListType() {
		return robListType;
	}
	public void setRobListType(String robListType) {
		this.robListType = robListType;

	}
	public String getOrderTime() {
				return orderTime;
	}
	public void setOrderTime(String orderTime) {
		
	    this.orderTime = orderTime;
	}
	public String getTimeSlot() {
		return timeSlot;
	}
	public void setTimeSlot(String timeSlot) {
		this.timeSlot = timeSlot;
	}
	public Float getServiceTime() {
		return serviceTime;
	}
	public void setServiceTime(Float serviceTime) {
		this.serviceTime = serviceTime;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getServicePersonal() {
		return servicePersonal;
	}
	public void setServicePersonal(String servicePersonal) {
		this.servicePersonal = servicePersonal;
	}
	public Float getCleaningSupplies_Price() {
		return cleaningSupplies_Price;
	}
	public void setCleaningSupplies_Price(Float cleaningSupplies_Price) {
		this.cleaningSupplies_Price = cleaningSupplies_Price;
	}
	public Float getPrice() {
		return price;
	}
	public void setPrice(Float price) {
		this.price = price;
	}
	public Float getRealPrice() {
		return realPrice;
	}
	public void setRealPrice(Float realPrice) {
		this.realPrice = realPrice;
	}
	public String getService_Price() {
		return service_Price;
	}
	public void setService_Price(String service_Price) {
		this.service_Price = service_Price;
	}
	public String getOrderState() {
		return orderState;
	}
	public void setOrderState(String orderState) {
		this.orderState = orderState;
	}
	public String getScore() {
		return score;
	}
	public void setScore(String score) {
		this.score = score;
	}
	public String getEvaluation() {
		return evaluation;
	}
	public void setEvaluation(String evaluation) {
		this.evaluation = evaluation;
	}
	public String getEvaluationTime() {
		return evaluationTime;
	}
	public void setEvaluationTime(Date xxx) {
		SimpleDateFormat myFmt=new SimpleDateFormat("yyyy-MM-dd");        
	    String evaluationTime= myFmt.format(xxx);
		this.evaluationTime = evaluationTime;
	}
	

}
